package com.aftersale.demo.Utils;

import java.util.Random;

/*
 *@Author  空
 *@Date    2023/10/13 11:21
 *@Desc
 */
public class PswUtil {
    private static char[] sa={'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
    //长度为16的随机盐
    public static String salt(){
        Random rd=new Random();
        StringBuilder sb=new StringBuilder(16);
        for (int i = 0; i < sb.capacity(); i++) {
            sb.append(sa[rd.nextInt(16)]);
        }
        return sb.toString();
    }

}
